﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GalaSoft.MvvmLight.Messaging;

namespace Drafter.Messages
{
    public class SaveFileDialogMessage:MessageBase
    {
        
        public string Title { get; set; }
        public string DefaultExtension { get; set; }
        public string Filter { get; set; }
        public Action<string> Callback { get; set; }

        public SaveFileDialogMessage(string title, Action<string> callback, string defaultExtension, string filter)
        {
            this.Title = title;
            this.Filter = filter;
            this.DefaultExtension = defaultExtension;
            this.Callback = callback;
        }

        public void ProcessCallback(string fileName)
        {
            if (this.Callback != null)
            {
                this.Callback(fileName);
            }
        }


    }
}
